﻿using System;
using System.Diagnostics;
using System.IO;

namespace Service.Logs
{
    public class Logging
    {

        public static void LogAlphaBeta(string msg)
        {
            try
            {
                StreamWriter file = new StreamWriter(Environment.CurrentDirectory + "\\ChessPFE\\AlphaBeta.txt", true);
                file.WriteLine("****************************************************");
                file.WriteLine("ran at: " + DateTime.Now);
                file.Write(msg + "\n");
                file.WriteLine("============== End ==================");
                file.WriteLine();
                file.Close();
            }
            catch (Exception e)
            {
                Debug.WriteLine("Error while logging");
            }
           
        }
        public static void LogAlphaBetaTree(string msg)
        {
            try
            {
                StreamWriter file = new StreamWriter(Environment.CurrentDirectory + "\\ChessPFE\\AlphaBetaVisual.txt", true);
                file.WriteLine("****************************************************");
                file.WriteLine("ran at: " + DateTime.Now);
                file.Write(msg + "\n");
                file.WriteLine("============== End ==================");
                file.WriteLine();
                file.Close();
            }
            catch (Exception e)
            {
                Debug.WriteLine("Error while logging");
            }
        }
    }
}